package com.ruoyi.personnel.mapper;

import com.ruoyi.personnel.domain.ReserveInformation;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 预约信息Mapper接口
 *
 * @author hyj
 * @date 2020-02-28
 */
public interface ReserveInformationMapper {

    public int createReserveInformation(ReserveInformation reserveInformation);

    @Select("select name from interviewee_info where tel_number = #{phone}")
    public String accessNameByPhone(@Param("phone") String phone);

    /**
     * 查询预约信息
     *
     * @param id 预约信息ID
     * @return 预约信息
     */
    public ReserveInformation selectReserveInformationById(Long id);

    /**
     * 查询预约信息列表
     *
     * @param reserveInformation 预约信息
     * @return 预约信息集合
     */
    public List<ReserveInformation> selectReserveInformationList(ReserveInformation reserveInformation);


    /**
     * 修改预约信息
     *
     * @param reserveInformation 预约信息
     * @return 结果
     */
    public int updateReserveInformation(ReserveInformation reserveInformation);

    /**
     * 删除预约信息
     *
     * @param id 预约信息ID
     * @return 结果
     */
    public int deleteReserveInformationById(Long id);

    /**
     * 批量删除预约信息
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteReserveInformationByIds(String[] ids);

    List<ReserveInformation> selectExamineByOpenId(String openId);
}
